CSharpTest.Net
DbGuid Constructor(Byte[])
See Also  Example Send Feedback Download Help File
CSharpTest.Net.Library Assembly > CSharpTest.Net.Data Namespace > DbGuid Structure > DbGuid Constructor : DbGuid Constructor(Byte[])

bytes

Glossary Item Box

Constructs a DbGuid from an array of 16 (or more) bytes.

Syntax

Visual Basic (Declaration) 
Public Function New( _
   ByVal bytes() As Byte _
)
C# 
public DbGuid( 
   byte[] bytes
)

Parameters

bytes

Example

Library/Library.Test/TestDbGuid.cs

C#Copy Code
DbGuid testA = DbGuid.NewGuid();
byte[] bytes = testA.ToByteArray();
DbGuid testB = new DbGuid(bytes);
Assert.AreEqual(testA, testB);
VB.NETCopy Code
Dim testA As DbGuid = DbGuid.NewGuid()
Dim bytes As Byte() = testA.ToByteArray()
Dim testB As New DbGuid(bytes)
Assert.AreEqual(testA, testB)

Requirements

Target Platforms: Windows XP, Windows Server 2003, Windows Vista, Windows Server 2008, Windows 7

See Also

Generated with Document! X 2011 by Innovasys